<?php
include_once "config.php";
include_once "config_db.php";
echo "<?xml version=\"1.0\"?";
echo ">\r\n<urlset xmlns=\"http://www.google.com/schemas/sitemap/0.9\">\r\n";
?>
<url>
<loc><?=$web_url?><?=$web_dir?></loc>
<lastmod><?php
$db->query( "SELECT * FROM tun2_content Order by addtime desc limit 0,1");
while ( $db->next_record( ) )
				{ 
			echo  $db->Record['addtime'];
				}
?></lastmod>
<changefreq>monthly</changefreq>
<priority>1.0</priority>
</url>
<?php
$db->query( "SELECT * FROM tun2_content Order by addtime desc");
while ( $db->next_record( ) )
				{ 
                    echo "<url>";
                    echo "<loc>"; 
                    $id=$db->Record['id'];
switch ( $webhtmlname )
{
case 1 :
				$tun2url = "view_".$id.".".$webmode;
				break;
case 2 :
				$tun2url = $tun2htmldate.".".$webmode;
				break;
case 3 :
				$tun2url = $id."/index.".$webmode;
				break;
}
   if ($webmode==php){
	echo  "".$web_url."".$webdir."class.php?id=".$db->Record['id']."";
   }else
   {
    echo "".$web_url."".$webdir."".$webhtmldir."".$tun2url."";
	}
  echo "</loc>\r\n";
  echo "<lastmod>".$db->Record['addtime']."</lastmod>\r\n";
  echo "<changefreq>monthly</changefreq>\r\n";
  echo "<priority>0.8</priority>\r\n";
  echo "</url>\r\n";
 } 
 ?>
</urlset>